<include file="Common/header" />
<link rel="stylesheet" href="__PUBLIC__/css/item/show.css" />

<div class="doc-body row">
	<!-- 左侧栏菜单 -->
	<div class="doc-left span3 bs-docs-sidebar pull-left">
            <div class="doc-head row">
                <div class="left">
                    <ul class="inline pull-right">
                        <if condition="$ItemPermn">
                        <li>
                            <div class="btn-group ">
                                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                                    <h3>
                                        {$item.item_name} <span class="caret" style="margin-top: 20px"></span>
                                    </h3>
                                </a>
                                <ul class="dropdown-menu">
                                    <!-- dropdown menu links -->
                                    <li><a href="{:U('Home/Item/word', array('item_id'=>$item['item_id']))}">导出</a></li>
                                    <if condition="$ItemCreator">
                                    <li><a href="{:U('Home/Item/add', array('item_id'=>$item['item_id']))}">修改信息</a></li>
                                    <li><a href="{:U('Home/Member/edit', array('item_id'=>$item['item_id']))}">成员管理</a></li>
                                    <li><a href="{:U('Home/Item/delete', array('item_id'=>$item['item_id']))}">删除</a></li>
                                    </if>
                                    <li><a href="{:U('Home/Item/index')}">更多项目</a></li>
                                </ul>
                            </div>
                        </li>
                        <else /> <if condition="! $login_user">
                        <li><a href="{:U('Home/User/login')}">登录/注册</a></li>
                        <else />
                        <li><a href="{:U('Home/Item/index')}">我的项目</a></li>
                        </if> </if>
                    </ul>
                </div>
            </div> 
	
		<ul class="nav nav-list bs-docs-sidenav">
			<foreach name="pages" item="page">
			<li><a
				href="{:U('Home/Page/index', array('page_id'=>$page['page_id']))}"
				data-page-id="{$page.page_id}"><i class="icon-blank"></i>{$page.page_title}</a></li>
			</foreach>
			<foreach name="catalogs" item="catalog">
			<li><a href="#"><i class="icon-chevron-right"></i>{$catalog.cat_name}</a>
				<ul class="child-ul nav-list hide">
					<foreach name="catalog.pages" item="catalog_page">
					<li><a
						href="{:U('Home/Page/index', array('page_id'=>$catalog_page['page_id']))}"
						data-page-id="{$catalog_page.page_id}">{$catalog_page.page_title}</a></li>
					</foreach>
				</ul></li>
			</foreach>
		</ul>
		<!-- 新建栏 -->
		<div class="doc-left-newbar">
			<if condition="$ItemPermn">
			<div>
				<a
					href="{:U('Home/Page/edit', array('item_id'=>$item['item_id'], 'type'=>'new'))}"
					id="new-like"><i class="icon-plus"></i>&nbsp;新建页面</a>
			</div>
			<div>
				<a
					href="{:U('Home/Catalog/edit', array('item_id'=>$item['item_id']))}"
					id="dir-like"><i class="icon-folder-open"></i>新建目录</a>
			</div>
			</if>
		</div>
		<input type="hidden" id="item_id" value="{$item.item_id}"> <input
			type="hidden" id="page_id" value="{$page_id}"> <input
			type="hidden" id="base_url" value="__APP__">
	</div>

	<div class="doc-right  span12 ">
		<!-- 编辑栏 -->
		<div class='page-edit-link pull-left'>
			<ul class="inline">
				<li><a href="" id="page-link" target="_blank"
					title="在新窗口打开单独的页面">独立页面</a></li>
				<li><a href="" id="word-link" title="导出word">导出word</a></li>
				<li><a href="" id="md-link" title="导出md">导出md</a></li>
				<if condition="$ItemPermn">
				<li><a href="" id="copy-link" title="复制该接口到新接口">复制</a></li>
				<li><a href="" id="edit-link" title="编辑接口">编辑</a></li>
				<li><a href="" title="删除接口"
					onclick="return confirm('确认删除吗？');return false;" id="delete-link">删除</a></li>
				<else />
				<li></li>
				<li></li>
				</if>
			</ul>
		</div>
		<!-- 页面内容 -->
		<div id="page-content" style="left: 250px;"></div>
	</div>

	<include file="Common/footer" />
	<!-- 分享项目框 -->
	<div class="modal hide fade" id="share-modal">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal"
				aria-hidden="true">&times;</button>
			<h3>分享</h3>
		</div>
		<div class="modal-body">
			<p>
				项目地址：
				<code>{$share_url}</code>
			</p>
			<p>你可以复制地址给你的好友</p>
		</div>
	</div>

	<!-- 分享页面框 -->
	<div class="modal hide fade" id="share-page-modal">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal"
				aria-hidden="true">&times;</button>
			<h3>分享页面</h3>
		</div>
		<div class="modal-body">
			<p>
				页面地址：
				<code id="share-page-link"></code>
			</p>
			<p>你可以复制地址给你的好友</p>
		</div>
	</div>
	<script src="__PUBLIC__/js/jquery.bootstrap-growl.min.js"></script>
	<script src="__PUBLIC__/js/jquery.hotkeys.js"></script>

	<script src="__PUBLIC__/js/item/show.js"></script>